import openpyxl


def get_each_row(sheet_data, r):
    cols_count = sheet_data.max_column
    line_data = []
    for l in range(2, cols_count):
        data = sheet_data.cell(r, l).value
        line_data.append(data)
    return line_data


def read_excel(filepath, sheet_name):
    # 读取Excel表
    f = openpyxl.load_workbook(filepath)

    # 读取某个datasheet
    sheet_data = f[sheet_name]

    # 获取行数和列数
    line_count = sheet_data.max_row

    # 读取每一行的数据
    result = []
    for row in range(2, line_count + 1):
        each_row = get_each_row(sheet_data, row)
        result.append(each_row)
# 123213